package edu.gmu.messages;
public class EndPoint implements edu.gmu.middleware.Message{
    public String address;
    public int port;
    
    public EndPoint()
    {
    
    }
    
    public EndPoint( String address, int port )
    {
        this.address = address;
        this.port    = port;
    }
    

    public void marshal(edu.gmu.streams.BlockOutputStream output) throws java.io.IOException{
        output.writeUTF(address);
        output.writeInt(port);
    }

    public void unmarshal(edu.gmu.streams.BlockInputStream input) throws java.io.IOException{
        this.address = input.readUTF();
        this.port    = input.readInt(); 
    }
    
    public String toString()
    {
        return"address=" + this.address + " port=" +this.port;
    }
}
